<template>
  <div class="menu">
    <!-- 搜索 -->
    <page-search
      :SearchFormConfig="SearchFormConfig"
      @handleQuerySubmit="handleQuerySubmit"
      @handleReset="handleResetClick"
    ></page-search>
    <!-- 表格数据 -->
    <page-content
      ref="pageContentRef"
      :contentTableConfig="contentTableConfig"
      pageName="menu"
    ></page-content>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

import { SearchFormConfig } from './config/search-config'
import { contentTableConfig } from './config/content.config'
import PageSearch from '@/base-ui/page-search'
import PageContent from '@/base-ui/page-content'
import { usePageSearch } from '@/hooks/use-page-search'
export default defineComponent({
  name: 'Menu',
  components: {
    PageSearch,
    PageContent
  },
  setup() {
    const { handleQuerySubmit, handleResetClick, pageContentRef } =
      usePageSearch()

    return {
      SearchFormConfig,
      contentTableConfig,
      handleQuerySubmit,
      handleResetClick,
      pageContentRef
    }
  }
})
</script>

<style scoped></style>
